<template>
<div class="main-container">
    <el-aside width='300px'>
      <Menu></Menu>
    </el-aside>
    <div class="content">
      <RouterView></RouterView>
    </div>
  </div>

</template>

<script setup>
import Menu from '@/components/Menu.vue';
import { ElAside } from 'element-plus';
import { RouterView } from 'vue-router'
import { useUserStore } from '@/stores/user'
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()
const userStore = useUserStore()

onMounted(() => {
  // 检查用户是否登录
  // if (!userStore.user) {
  //   router.replace('/')
  // }
})
</script>

<style scoped>
.main-container {
  display: flex;
  min-height: 100vh;
}

.content {
  flex: 1;
  padding: 20px;
  margin-left: -150px;
  display: flex;
  justify-content: center;  /* 添加这行 */
}
</style>
